package hotciv.factories;

import java.util.HashMap;

import hotciv.common.CityImpl;
import hotciv.common.CommonAction;
import hotciv.common.CommonAger;
import hotciv.common.CommonBattle;
import hotciv.common.CommonCityPopulation;
import hotciv.common.CommonCityResource;
import hotciv.common.CommonTileMap;
import hotciv.common.CommonWinner;
import hotciv.common.UnitImpl;
import hotciv.framework.ActionStrategy;
import hotciv.framework.AgingStrategy;
import hotciv.framework.BattleStrategy;
import hotciv.framework.City;
import hotciv.framework.CityPopulationStrategy;
import hotciv.framework.CityResourceStrategy;
import hotciv.framework.GameConstants;
import hotciv.framework.HotCivFactory;
import hotciv.framework.Player;
import hotciv.framework.Position;
import hotciv.framework.TileMap;
import hotciv.framework.Unit;
import hotciv.framework.WinnerStrategy;

public class AlphaCivFactory implements HotCivFactory {
	protected HashMap<Position, Unit> unitMap;
	protected HashMap<Position, City> cityMap;
	
	public AlphaCivFactory() {
		unitMap = new HashMap<Position, Unit>();
		unitMap.put(new Position(2,0), new UnitImpl(GameConstants.ARCHER, Player.RED));
		unitMap.put(new Position(3,2), new UnitImpl(GameConstants.LEGION, Player.BLUE));
		unitMap.put(new Position(4,3), new UnitImpl(GameConstants.SETTLER, Player.RED));
		
		cityMap = new HashMap<Position, City>();
		cityMap.put(new Position(1,1), new CityImpl(Player.RED, GameConstants.ARCHER, GameConstants.productionFocus));
		cityMap.put(new Position(4,1), new CityImpl(Player.BLUE, GameConstants.ARCHER, GameConstants.productionFocus));
	}
	
	@Override
	public AgingStrategy agingStrategy() {
		return new CommonAger();
	}

	@Override
	public WinnerStrategy winnerStrategy() {
		return new CommonWinner();
	}

	@Override
	public ActionStrategy actionStrategy() {
		return new CommonAction();
	}

	@Override
	public TileMap tileMap() {
		return new CommonTileMap();
	}
	
	@Override
	public HashMap<Position, Unit> unitMap() {
		return unitMap;
	}

	@Override
	public HashMap<Position, City> cityMap() {
		return cityMap;
	}

	@Override
	public BattleStrategy battleStrategy() {
		return new CommonBattle();
	}
	
	@Override
	public CityPopulationStrategy cityPopulationStrategy() {
		return new CommonCityPopulation();
	}
	
	@Override
	public CityResourceStrategy cityResourceStrategy() {
		return new CommonCityResource();
	}

	

}
